/* ========================================================================= */
/* ------------------------------------------------------------------------- */
/*!
  \file			cst_act.h
  \date			June 2011
  \author		TNick

  \brief		Contains the definition for CstAct class


 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @n
 Please read ReadMe.txt and Licence.txt in root folder @n
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @n

*/
/* ------------------------------------------------------------------------- */
/* ========================================================================= */
#ifndef __CST_ACT_INC__
#define __CST_ACT_INC__
//
//
//
//
/*  INCLUDES    ------------------------------------------------------------ */

class	CstAct;

#include	<QAction>
#include	<QIcon>

#include	<generic/cc_l2d.h>

/*  INCLUDES    ============================================================ */
//
//
//
//
/*  DEFINITIONS    --------------------------------------------------------- */

struct		CstActPrp	{

	/// the long description for the command
	QString			s_descr_short;

	/// the long description for the command
	QString			s_descr_long;

	/// the actual command to use
	QString			s_command;

	/// path to icon
	QString			s_icon_path;

};



/*  DEFINITIONS    ========================================================= */
//
//
//
//
/*  CLASS    --------------------------------------------------------------- */

/// class representing a single customisable action
/**
*/
class CstAct : public CC_L2D		{

	//
	//
	//
	//
	/*  DEFINITIONS    ----------------------------------------------------- */

	/*  DEFINITIONS    ===================================================== */
	//
	//
	//
	//
	/*  DATA    ------------------------------------------------------------ */

private:
	/// properties of this action
	CstActPrp				data;

	/// pointer to actual action
	QAction*		qtact;

	/*  DATA    ============================================================ */
	//
	//
	//
	//
	/*  FUNCTIONS    ------------------------------------------------------- */

public:

	/// constructor;
	/**
	*	extended description
	*/
	CstAct		(void) : CC_L2D() {}

	/// destructor;
	/**
	*	extended description
	*/
	virtual				~CstAct		(void) {}


	/// set the short description
	inline  void setShortDescr(QString s_new) {
		data.s_descr_short = s_new;
	}
	/// get short description
	inline QString shortDescr(void) {
		return data.s_descr_short;
	}

	/// set the long description
	inline void setLongDescr(QString s_new) {
		data.s_descr_long = s_new;
	}
	/// get long description
	inline QString longDescr(void) {
		return data.s_descr_long;
	}

	/// set the command
	inline void setCommandStr(QString s_new) {
		data.s_command = s_new;
	}
	/// get command
	inline QString commandStr(void) const {
		return data.s_command;
	}

	/// set the path to icon
	inline void setIconPath(QString s_new) {
		data.s_icon_path = s_new;
	}
	/// get path to icon
	inline QString iconPath(void) const {
		return data.s_icon_path;
	}
	/// get the icon
	inline QIcon icon(void) const {
		return QIcon(data.s_icon_path);
	}

	/// copy the properties from another item
	inline void setProperties(CstAct* p_source)
	{ data = p_source->data; }
	/// set the properties from a data structure
	inline void setProperties(CstActPrp* p_source)
	{ data = *p_source; }



	/*  FUNCTIONS    ======================================================= */
	//
	//
	//
	//

};	/*	class CstAct	*/

/*  CLASS    =============================================================== */
//
//
//
//
#endif // __CST_ACT_INC__
/* ------------------------------------------------------------------------- */
/* ========================================================================= */

